home *** CD-ROM | disk | FTP | other *** search
- Introduction.
-
- pcBESTOP is an interpreter written for the IBM compatiple PC. It is a
- 32-bit program that runs under Windows-95 and Windows NT. My intent was
- to provide pretty much the same functionality as the BESTOP that is
- available on the IBM370; you should read BESTOP.DOC that was written for
- the IBM370 version. Differences between the mainframe version and the PC
- version are noted below.
-
- pcBESTOP allows you to quickly reformat files, extract data, summarize
- data, match/merge files, perform table lookup and other functions. It
- is a positional language with a one character operations code. In the PC
- version though, I've added a couple of two character op codes. Programs
- can be written very very quickly.
-
-
- Installation.
-
- After you have unzipped all the files, put the .DLL and .EXE files into
- a subdirectory that is in your path; for example C:\WINDOWS.
-
-
- Status.
-
- This is a shareware program. It may be distributed freely. Educational
- institutions and students need not send remuneration.
-
-
- Contacting the author. (see REGISTER.TXT)
-
-
- --------------------------------------------------------------------------
-
- 4/6/97 release 1
-
- This is the first version of pcBESTOP. The functions that are currently
- supported are listed below, they are checked with a "√" mark. Item marked
- with an "*" will not be implemented, at leat not now.
-
- OPERATION SYNTAX
-
- √ IF_(Character_Field_Comparison) I field [EGLU] [field|const] [AO ]
- √ IF_(Numeric_Field_Comparison) I N field [EGLU] [field|const] [AO ]
- * IF_(Multiple_Comparison) I M field [EU] const [AO ]
- √ IF_(character_comparison) I C field [EU] const
- √ IF_(Control_Break) I field [AO ]
- √ IF_(Printer_Line_Test) I C [EGLU] const [AO ]
- √ IF_(Matched Files) I [ABM] [AO ]
- √ IF_(Start/End of File) I [SF] [AO ]
- √ OTHERWISE O
- √ UNCONDITIONAL U
- √ MATCH_KEYS K field field (field field)...
- √ MOVE M [field|const] field
- √ MOVE_(from_displaced_field) M field D field field
- √ MOVE_(to_displaced_field) M [field|const] field D field
- √ FIND F [field|const] field D field
- √ DO_AGAIN D
- √ EDIT E field field const
- √ CLEAR C field const
- √ ADD + [field|const] field
- √ SUBTRACT - [field|const] field
- √ MULTIPLY X field [field|const] (0-9) field
- √ DIVIDE / field [field|const] (0-9) field
- √ WRITE_(Numbered_Files) W (1-6)
- √ WRITE_(Listing_with_Spaces) W L [1-9H]
- * WRITE_(Listing_with_Skip_to_Numbered_Line) W L S const
- * Write_(Space_Printer_without_Printing) W S [1-9H]
- * WRITE_(Skip_to_Numbered_Line_without_Printing) W S const
- √ GET G
- √ HALT H
- √ SUBROUTINE S [1-9A-Z]
- √ RETURN R
- √ BRANCH B [1-9A-Z]
- √ TABLE_DEFINITION T [1-9A-Z] field field
- √ TABLE_ENTRY const
- √ LOOKUP L [1-9A-Z] [ELH]
-
-
- The files that are supported are 1 thru 6, L and S. Very little syntax
- checking is being done; I expect the programs to be clean. Below is
- a typical batch file. It shows how external files names are communicated
- to the program.
-
-
- @set dd:sysprint=STDOUT:
- @set dd:sysprint=dump,append(n)
- @SET DD:PROGRAM=P3.BST
- @set dd:file1=file1
- @set dd:file2=extract.dat,append(n)
- @set dd:file3=MYCOMP.DSM
- @set dd:listing=matched.dat,append(n)
- BESTOP /T=1,A=1,B=3
-
-
- *here is a test program.
- K 1.2.5 3.2.5
- I M
- m 1.1.50 s.1.50
- m s.41.50 l.1.10
- C L.66 'a'
- w l
- I 3.30 E '0'
- M 3.1.66 2.1.66
- W 2
-
-
- When I ran this batch file and program, I got the following on a
- 200Mhz Pentium.
-
-
- D:\HB2|t3
- D:\HB2|BESTOP /T=1,A=1,B=3
-
- pcBESTOP ;-) 97.095.10:08ß (C)1997 Hans J. Becker
- Elapsed time= 2 sec
- F1 23 F2 978 F3 7233 F4 0 F5 0 F6 0 List 23
-
-
- NOTES:
-
-
- If an output file previously exists, then new data will be appended unless
- it does not previously exist or 'append(n)' has been specified.
-
- All subroutines need to be coded at the "end" of the program. The table
- follows the subroutines.
-
- Results from arithmetic calculations will be stored in zoned-decimal
- format. Since fields involved in calculations are implictly identified
- as numeric, resulting fileds will be zero filled.
-
- The Key instruction must be the first instruction in the program.
-
- All comments and blank lines are ignored and not stored (v. ";" below).
-
- Use single quote to delimit strings.
-
- "W L 2" means write AFTER skipping one lines; i.e. 2 lines are written.
-
- The default values are LNSIZE=80 and PGSIZE=60 for LISTING. These values
- can be overriden in the execute statement as follows
-
- BESTOP /I=1,LNSIZE=133,PGSIZE=55
-
- To write a header for a report, typically code something like this
-
- I C L '02'
- C L.1.80 '*'
- W L 1
- C L.1 '*'
- C L.80 '*'
- [more header info]
- W L
- C L.1.80 '*'
- W L 1
- U
-
- When the number of lines on a page exceed PGSIZE, a new page and header
- will be written. The LISTING file has the "print" attribute, therefore
- it starts out with a 0x0C.
-
- Control-break processing and matched-file processing are
- mutually exclusive.
-
-
- --------------------------------------------------------------------------
-
- Changes:
-
- 4/9/97
-
- Clear buffer i for W i, i.e. clear the buffer after a write.
-
- BESTOP can now do a table look-up. You can have only one table
- and it has to be an internal table i.e. part of the program.
-
-
- 4/10/97
-
- The look-up table gets sorted and the search is a binary search
- when L i E was coded. A sequential search is used whenever
- L i L or L i H is coded.
-
-
-
- 4/11/97
-
- Multiply and divide works now. The scale factor for division is 6;
- i.e. you can specisfy up to 6 decimal places.
-
- Added E(diting) facility. You can have a period as an insertion
- character and blanks are uses for zero suppression; this is
- the only editing than can be done at this time.
-
- 4/12/97
-
- Consolidated compound condition processing for the various forms
- of the IF statement.
-
- Added Character Compare IF.
-
-
- 4/13/97
-
- DO AGAIN has been added.
-
- 4/18/97
-
- Added the DATE are, i.e. YYMMDD is in D.27.31
-
- Allow for stacked commands using the semicolon as the parsing
- character (see program example P8). Be aware that the semicolon
- also terminates a comment, i.e. the following line will produce
- and error
- *TESTING NUMERIC IF; CONTROL BREAK
-
- since it parses as
-
- *TESTING NUMERIC IF
- CONTROL BREAK <- error
-
- Added the CHange command
-
- CH 'target' [col1][/col2] 'replacement'
-
-
- There are several useful command line switches:
-
- DEBUG prints the program after it has been resolve by the parsing
- routine. Use this to verify that this is what you expected the
- program to do. Only the fields 1 thru 5 are displayed.
-
-
- D:\HB2\EXAMPLES|BESTOP /I=1,DEBUG
-
- pcBESTOP ;-) 97.109.08:30 (C)1997 Hans J. Becker
- 001 1: I 2: 1.3 3: E 4: '9' 5: O
- 002 1: I 2: 1.11.13 3: E 4: 'rwx' 5:
- 003 1: M 2: 1.1.80 3: S.1.80 4: 5:
- 004 1: CH 2: 'ico' 3: 6/20 4: '&&&&' 5:
- 005 1: CH 2: 'DATA' 3: 'data' 4: 5:
- 006 1: CH 2: '\NETSCAPE 3: '' 4: 5:
- 007 1: CH 2: '5' 3: '$' 4: 5:
- 008 1: CH 2: ':' 3: 48 4: '=' 5:
- 009 1: CH 2: ' ' 3: 11/50 4: '_' 5:
- 010 1: M 2: S.1.80 3: L.1.80 4: 5:
- 011 1: W 2: L 3: 1 4: 5:
- 012 1: U 2: STOP 3: HERE 4: 5:
- Elapsed time= 1 sec 04/19/97 08:36.32
- F1 81 F2 0 F3 0 F4 0 F5 0 F6 0 List 46
-
-
- VERBOSE prints the program as it is read.
-
-
- D:\HB2\EXAMPLES|BESTOP /I=1,verbose
-
- pcBESTOP ;-) 97.109.08:30 (C)1997 Hans J. Becker
- *TEST CHange
- I 1.3 E '9' O
- I 1.11.13 E 'rwx'
- M 1.1.80 S.1.80 *ch is made only in "S"
- CH 'ico' 6/20 '&&&&' *note ch in size
- CH 'DATA' 'data'
- ch '\NETSCAPE' '' *note ch in size
- CH '5' '$'
- ch ':' 48 '=' *ch in specific col
- CH ' ' 11/50 '_' *ch between specific cols
- M S.1.80 L.1.80
- W L 1
- Elapsed time= 0 sec 04/19/97 08:56.24
- F1 81 F2 0 F3 0 F4 0 F5 0 F6 0 List 46
-
-
- TRACE shows order in which the program statements are executed. Use
- this to checks your program logic.
-
-
- D:\HB2\EXAMPLES|BESTOP /I=1,trace
-
- pcBESTOP ;-) 97.109.08:30 (C)1997 Hans J. Becker
- <LOGIC>
- 001 1: I 2: 1.3 3: E 4: '9' 5: O
- 002 1: I 2: 1.11.13 3: E 4: 'rwx' 5:
- 003 1: M 2: 1.1.80 3: S.1.80 4: 5:
- 004 1: CH 2: 'ico' 3: 6/20 4: '&&&&' 5:
- 005 1: CH 2: 'DATA' 3: 'data' 4: 5:
- 006 1: CH 2: '\NETSCAPE 3: '' 4: 5:
- 007 1: CH 2: '5' 3: '$' 4: 5:
- 008 1: CH 2: ':' 3: 48 4: '=' 5:
- 009 1: CH 2: ' ' 3: 11/50 4: '_' 5:
- 010 1: M 2: S.1.80 3: L.1.80 4: 5:
- 011 1: W 2: L 3: 1 4: 5:
- 012 1: U 2: STOP 3: HERE 4: 5:
- <LOOP><001><002><001><002><001><002><001><002><001><002><001><002><001><002><001
- ><002><001><002><001><002><003><004><005><006><007><008><009><010><011><001><002
- ><001><002><001><002><001><002><003><004><005><006><007><008><009><010><011><001
- ><002><001><002><001><002><001><002><001><002><001><002><001><002><001><002><001
- ><002><001><002><001><002><001><002><001><002><003><004><005><006><007><008><009
- ><010><011><001><002><001><002><001><002><001><002><001><002><001><002><001><002
- ><001><002><003><004><005><006><007><008><009><010><011><001><002><003><004><005
- ><006><007><008><009><010><011><001><002><003><004><005><006><007><008><009><010
- ><011><001><002><003><004><005><006><007><008><009><010><011><001><002><003><004
- ><005><006><007><008><009><010><011><001><002><003><004><005><006><007><008><009
- ><010><011><001><002><003><004><005><006><007><008><009><010><011><001><002><003
- ><004><005><006><007><008><009><010><011><001><002><003><004><005><006><007><008
- ><009><010><011><001><002><003><004><005><006><007><008><009><010><011><001><002
- ><003><004><005><006><007><008><009><010><011><001><002><003><004><005><006><007
- ><008><009><010><011><001><002><003><004><005><006><007><008><009><010><011><001
- ><002><003><004><005><006><007><008><009><010><011><001><002><003><004><005><006
- ><007><008><009><010><011><001><002><003><004><005><006><007><008><009><010><011
- ><001><002><003><004><005><006><007><008><009><010><011><001><002><003><004><005
- ><006><007><008><009><010><011><001><002><003><004><005><006><007><008><009><010
- ><011><001><002><003><004><005><006><007><008><009><010><011><001><002><003><004
- ><005><006><007><008><009><010><011><001><002><003><004><005><006><007><008><009
- ><010><011><001><002><003><004><005><006><007><008><009><010><011><001><002><003
- ><004><005><006><007><008><009><010><011><001><002><003><004><005><006><007><008
- ><009><010><011><001><002><003><004><005><006><007><008><009><010><011><001><002
- ><003><004><005><006><007><008><009><010><011><001><002><003><004><005><006><007
- ><008><009><010><011><001><002><003><004><005><006><007><008><009><010><011><001
- ><002><003><004><005><006><007><008><009><010><011><001><002><003><004><005><006
- ><007><008><009><010><011><001><002><003><004><005><006><007><008><009><010><011
- ><001><002><003><004><005><006><007><008><009><010><011><001><002><003><004><005
- ><006><007><008><009><010><011><001><002><003><004><005><006><007><008><009><010
- ><011><001><002><003><004><005><006><007><008><009><010><011><001><002><003><004
- ><005><006><007><008><009><010><011><001><002><003><004><005><006><007><008><009
- ><010><011><001><002><003><004><005><006><007><008><009><010><011><001><002><003
- ><004><005><006><007><008><009><010><011><001><002><003><004><005><006><007><008
- ><009><010><011><001><002><003><004><005><006><007><008><009><010><011><001><002
- ><003><004><005><006><007><008><009><010><011><001><002><001><002><001><002><001
- ><002>
- Elapsed time= 0 sec 04/19/97 08:58.36
- F1 81 F2 0 F3 0 F4 0 F5 0 F6 0 List 46
-
-
-
- DUMP=n causes n input records to be dumped to FILEDUMP. This is particularly
- useful when trying match/merge files. The dumped output lists the file number
- followed by a colon and then the data.
-
-
- 4/23/97
-
- Type 2 match (T=2) one-for-one/many now works.
-
- 4/25/97
-
- added a TRanslate function
-
- TR field source-const target-const
-
- added find and both forms of the displacement moves
-
- One more dubugging tool is the DMP option; it causes all the varliables
- to be dummped at the end of the program or when an error occured.
- e.g.
-
- BESTOP /T=1,A=1,B=3,LNSIZE=120,PGSIZE=9999,DUMP=100,DMP
-
- and here is a partial listing of the output
-
-
- pcBESTOP ;-) 97.116.13:55 (C)1997 Hans J. Becker
- Elapsed time= 2 sec 04/27/97 08:33.35
- F1 91 F2 0 F3 84 F4 0 F5 0 F6 0 List 160
- . . . . . . . . . . . . . . . . . . .DUMP. . . . . . . . . . . . . . . . . . .
- ICH='pcBESTOP ;-) 97.116.13:55 (C)1997 Hans J. Becker '
- LOWER='abcdefghijklmnopqrstuvwxyz' UPPER='ABCDEFGHIJKLMNOPQRSTUVWXY
- Z' AKEY='
- ' BKEY='
- ' BUFFER='
- total 968' BLOCK='total 968 ' CNT1=
- 91 CNT2= 0 CNT3= 84 CNT4=
- 0 CNT5= 0 CNT6= 0 CNTL=
- 160 COL1= 0 COL2= 0 COND='0'
- B DEBUG='0'B DMP='1'B DUMP=
- 100 EXTENT= 2 EOF='1'B EOT='0'B
- EOF1='1'B EOF2='1'B EOF3='1'
- B EOF4='1'B EOF5='1'B EOF6='1'
- B EOP='1'B ERROR= 0 FALSE='0
- 'B FILE_CODE='L' FIRST_PRINT='0'B FIRST_RE
- AD='0'B FIRST_TIME='0'B FLD='L.112.116' HEX00='
-
-
- 5/2/97
-
- In oder to stay with a one character op-code,
- let A (alter) be an alias for the CHange command and
- let Z (zap?) be an alias for the TRanslate command.
-